package com.jeff.tianti.cms.entity;

import com.jeff.tianti.common.entity.BaseEntity;
import com.jeff.tianti.common.util.DateUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.text.DateFormat;

@Entity
@Table(name = "activity_alerts")//江苏频道_活动快讯内容配置表
public class ActivityAlerts extends BaseEntity {
    private static final long serialVersionUID = 1849919733951063256L;
    public static final String STATE_ZERO = "0";//0->活动快讯
    public static final String STATE_ONE = "1";// 1->会员之家
    @Column(name = "type")
    private String type;//0->协会快讯,1->重要活动 2->年度计划
    @Column(name = "title")
    private String title;//标题
    @Column(name = "state")
    private String state;//0->活动快讯 1->会员之家
    @Column(name = "author")
    private String author;//作者
    @Column(name = "source")
    private String source;//来源
    @Column(name = "introduction")
    private String introduction;//导读
    @Column(name = "url")
    private String url;//图片
    @Column(name = "file")
    private String file;//file路径
    @Column(name = "content")
    private String content;//内容
    @Column(name = "time")
    private String time;//年读计划中使用的月份   例:2019-5
    @Column(name = "sort")
    private int sort;
    private String createDateStr;

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    @Transient
    public String getCreateDateStr() {
        return DateUtils.dateToString(createDate);
    }

    public void setCreateDateStr(String createDateStr) {
        this.createDateStr = createDateStr;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFile() {
        return file;
    }

    public void setFile(String file) {
        this.file = file;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
